home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000102_icon-group-sender _Mon Jun 22 16:44:52 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  8KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id QAA22862
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 22 Jun 1998 16:44:51 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA23562; Mon, 22 Jun 1998 16:44:41 -0700
  7. Date: Mon, 22 Jun 1998 16:39:26 -0500
  8. Message-Id: <199806222139.QAA25152@segfault.cs.utsa.edu>
  9. From: Clinton Jeffery <jeffery@segfault.cs.utsa.edu>
  10. To: frank.sergeant@pobox.com
  11. Cc: icon-group@baskerville.CS.Arizona.EDU
  12. In-Reply-To: <Avpi1Yv1ukQG084yn@eskimo.com> (pygmy@eskimo.com)
  13. Subject: Re: using Icon for database application
  14. Reply-To: jeffery@cs.utsa.edu
  15. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  16. Status: RO
  17. Content-Length: 7013
  18.  
  19. [Frank Sergeant offered a discussion of a large Clipper application that
  20. he is maintaining, followed by a number of Icon questions.]
  21.  
  22. Hi Frank,
  23.  
  24. I'm glad you liked the Linux Journal article on Icon.  While I disagree with
  25. Gordon Peterson's answers to your questions on many or most points, he did
  26. say several things that are very true; you will have to figure out for
  27. yourself which of his comments are relevant for your application.  I suspect
  28. Gordon has more experience than I with xBase languages (although I did
  29. program-for-hire in dBase III and Foxbase).  I've done a lot more Icon
  30. programming than Gordon, who frequently posts about Snobol in the Icon
  31. group, bless his heart!
  32.  
  33. >   Icon questions (or comments)
  34. >    1. How do you think all this fits with Icon?
  35.  
  36. Icon isn't a special-purpose database language.  Its built-in types are
  37. designed for flexible data manipulation in main memory.  If that's what
  38. you want to do, you are all set; if not, you should look for a database
  39. language, or think about connecting Icon to a third-party database engine.
  40. There's more on memory requirements in your question 9 below.
  41.  
  42. >    2. I gather Windows Icon can make a normal looking
  43. >       Windows application (rather than a Motif-ish
  44. >       application) and that I probably could figure out
  45. >       how to do this by reviewing the source code for Wi.
  46. >       Does that sound reasonable?  Would _Graphics
  47. >       Programming in Icon_ help?
  48.  
  49. Well, you shouldn't have to learn it by studying source code.  Both the
  50. on-line reference and an appendix in "Graphics Programming in Icon" discuss
  51. these functions, which are quite simple.
  52.  
  53. >    3. How fast is an Icon application?
  54.  
  55. In your hypothetical client/server architecture, the database engine
  56. performance will be your bottleneck.  Icon's graphics are plenty fast enough
  57. for 486 clients, but Icon would not be suitable for the server software
  58. unless either (a) enough main memory was available to fit all the indices
  59. and preferably the data as well, or (b) you extended Icon to access a
  60. third-party database, such as Postgres or mSQL.
  61.  
  62. >    4. How big would the .EXE file be?
  63.        How does .EXE file size grow after [the 200/300K interpreter]?
  64.  
  65. It grows at a moderate rate :-) depending on how effectively you are using
  66. the built-in features.  The virtual machine is by nature higher-level and
  67. potentially more compact than many languages, but if you write many thousands
  68. of lines of Pascal-like (or xBase-like) code, it will be huge.
  69.  
  70. One wart I know of at present: if you use tons of different record types you
  71. get penalized (this is true, for example, of the Motif-like portable widgets
  72. in the Icon Program Library).  I thought a student had fixed this for me,
  73. but his "field table compression" has some bugs that need fixing before we
  74. turn it on and leave it on by default.
  75.  
  76. >       Currently our .EXE is about 850K, so I can live with that size,
  77. >       but would prefer smaller.
  78.  
  79. I think the Icon program would be larger, unless your rewrite substantially
  80. reduces the number of lines of code to exploit Icon's built-in features.  If
  81. you just translated xBase line-by-line into Icon the result will be huge.
  82. Clipper is (was?) a fine commercial-quality product.
  83.  
  84. >    5. Is a sockets interface only available for Unicon or
  85. >       is it also available for Wicon?
  86.  
  87. Ah, its time for some vaporware.  Sockets are only available on Unix at the
  88. present time.  I've merged Unicon into my main source tree so that I can
  89. start porting it to Windows, but I have to wrangle with some other problems
  90. in Icon 9.3.2 before I take that on.
  91.  
  92. >       If sockets are not built in to Icon, how hard is it to make
  93. >       calls to the Win32 system?  How about to routines
  94. >       produced by MSVC or Borland C?  Perhaps I could
  95. >       write the socket access routines in C and call them
  96. >       from Icon?
  97.  
  98. I keep getting nibbles, but so far no one has volunteered to implement this
  99. kind of access.  You can get the Windows Icon source and make such
  100. extensions yourself, and if you build something really useful I'd certainly
  101. like to incorporate it into the main public domain Windows Icon
  102. distribution.
  103.  
  104. >    6. So far I haven't been able to track down Idol.  A url or two for
  105. >          Idol on the web site seemed to give an "invalid" message.
  106. >       it seems I should consider using Idol if I use Icon, right?
  107.  
  108. My apologies; there was a reorganization that left a bad symbolic link.
  109. The main Idol web site is now www.cs.utsa.edu/research/idol/ and I am
  110. in the process of packaging a release of Windows Idol.  You should consider
  111. using Idol if you want to write object-oriented applications or have a large
  112. complex application with many user-defined types.
  113.  
  114. >    7. I currently make extensive use of Clipper's "ragged arrays".
  115. >          These are essentially lists where the elements can be of any
  116. >          type including other lists.  It looks like Icon's lists would
  117. >          just drop in and work the same.
  118.  
  119. Yes, or better.
  120.  
  121. >    8. The current app is about 150,000 lines (over 100 source code
  122. >          files).  How does Icon handle applications of this size?
  123.  
  124. Icon is generally tuned for speed, rather than to minimize space
  125. requirements.  I've heard reports of Unix Icon programs in the million line
  126. range, but haven't seen a Windows Icon program in the 100K range yet.  My
  127. impression is that Windows manages virtual memory much worse than UNIX or
  128. Linux.  On old 486's with 8MB of memory you may run into terrible problems
  129. unless you split the application up into a thin "client" program that can
  130. access a server with more muscle.
  131.  
  132. >           I think the app is currently more complex than is required.
  133. >           All we do, really, is keep track of, display, modify various
  134. >           lists --  lists of doctors, patients, insurance companies,
  135. >        charges, paygments, and such.  (How hard can it be?)
  136.  
  137. This is generally vastly easier in Icon than in an xBase language.
  138.  
  139. >    9. The data, ignoring index files, probably runs 2 to
  140. >       10 MB in most offices.  At the larger sizes, much of
  141. >       the data is relatively inactive and could be rolled
  142. >       out to archives.  On a modern machine, all the data
  143. >       would fit in RAM.
  144.  
  145. I heartily recommend memory-based databases!  Memory is cheap.
  146. The server should have lots of memory.
  147.  
  148. >       10. I have been very impressed with Bertrand Meyer's
  149. >       _Object Oriented Software Construction_.  Can anyone
  150. >       comment on the differences between Eiffel and Icon,
  151. >       that is, why I might prefer Icon over Eiffel, etc?
  152.  
  153. Icon is dynamically typed, offers a lot more flexibility, and has a much
  154. higher-level set of built-in data structures and operators.  Eiffel is a
  155. very good object-oriented systems language geared more for multi-programmer
  156. efforts that might otherwise be written in C++ or Ada.  You write a lot more
  157. lines of code in Eiffel to do the same work.  Eiffel may run quite a bit
  158. faster; I am not sure how much.
  159.  
  160. Cheers,
  161.  
  162. Clint Jeffery, jeffery@cs.utsa.edu
  163. Division of Computer Science, The University of Texas at San Antonio
  164. Research http://www.cs.utsa.edu/research/plss.html
  165.